package com.yeraphael.mapper;


import com.yeraphael.entity.EmpTempData;
import com.yeraphael.entity.ReportMultiData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ReportMapper {

//    @Select("select gender name, count(*) value from emp group by gender")
    List<ReportMultiData> getGerder();

    @Select("select job as name, count(*) as value from emp group by job")
    List<EmpTempData> getjobData();

    @Select("select degree name, count(*) value from student group by degree")
    List<ReportMultiData> getDegreeData();

    @Select("select c.name name, count(*) value from clazz c left join student s on c.id = s.clazz_id group by c.name")
    List<EmpTempData> getCountData();
}
